<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" 	prefix="s"%>
<%@ include file="/jsp/common/common_head.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<title>示界港管理平台</title>
<%@ include file="/jsp/common/common_script.jsp"%>
<style type="text/css">
</style>
<script type="text/javascript">
 var g_userId = '<%=session.getAttribute("userId")%>';
</script>
</head>
<body>
<table class="queryTable" >
	<tr>
		<td class="queryTitle" width="75px">大分类</td>
		<td class="queryContent">
			<select id="queryTmplType" name="queryTmplType" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 120px" ></select>
		</td>
		<td class="queryTitle" width="75px">中分类</td>
		<td class="queryContent">
			<select id="queryTmplType2" name="queryTmplType2" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 120px" ></select>
		</td>
		<td class="queryTitle" width="75px">小分类</td>
		<td class="queryContent">
			<select id="queryTmplType3" name="queryTmplType3" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 120px" ></select>
		</td>
		<td class="queryTitle" width="75px">设计模版名</td>
		<td class="queryContent">
			<input class="inputText" type="text" id="queryTmplName" />
		</td>
		<td class="queryTitle" width="40px">VIP</td>
		<td class="queryContent">
		    <select id="queryVip" name="queryVip" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 80px" >
		    		<option value="">[不限]</option>
					<option value="0">普通模版</option>
					<option value="10">VIP模版</option>
			</select> 
		</td>
	</tr>
	<tr>
		
		<td class="queryTitle" width="75px">模版ID</td>
		<td class="queryContent">
			<input class="inputText" type="text" id="queryTmplId" style="width:120px;" />
		</td>
		<td class="queryTitle" width="68px">组织机构</td>
		<td class="queryContent">
			<select id="queryTgOrg" name="queryTgOrg" class="easyui-combobox" panelHeight="150px" editable="false" style="width: 120px"></select>
		</td>
		<td class="queryTitle" width="60px">发布状态</td>
		<td class="queryContent">
		    <select id="queryPublish" name="queryPublish" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 120px" >
		    		<option value="">[不限]</option>
					<option value="0">未发布</option>
					<option value="1">已发布</option>
			</select> 
		</td>
		<td class="queryTitle" width="75px">关联商品ID</td>
		<td class="queryContent">
			<input class="inputText" type="text" id="queryItemId" />
		</td>
		<td class="queryBtnTd" colspan="2">
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search"  onclick="doQuery(1)">查询</a>
		</td>
	</tr>
</table>

<table id="tmplGrid"></table>

<div id="orderDlg" class="easyui-window" title="" closed="true" style="width:600px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="orderForm"  method="POST">
			<s:hidden name="designId" id="designId"/>
			<table border="0" class="queryTable" width="95%" height="auto" style="margin-bottom:0px;" id="orderTable">
				<tr>	
					<td class="queryTitle" width="80px">显示顺序</td>
					<td class="queryContent">
						<s:textfield id="order" name="order" cssClass="inputText easyui-validatebox" data-options="" onkeyup="value=value.replace(/[^\d]/gi,'')" cssStyle="width:250px"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="orderBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="doUpdOrder()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelUpdOrder()">取消</a>
    </div>
</div>

<div id="uDocDlg" class="easyui-window" closed="true" style="width:1000px; height:auto;text-align:center; background: #fff;">
	<form id="udocForm"  method="POST">
	<table id="uDocTable" class="queryTable" style="margin: 0px">
		<tr>
			<td class="queryTitle" width="100px"><span style="color:red;">模板ID:</span><span id="disign_id"></span></td>
			<td class="queryTitle" width="60px">文档ID</td>
			<td class="queryContent">
				<input class="inputText" type="text" id="queryDocId" />
			</td>
			<td class="queryTitle" width="60px">用户ID</td>
			<td class="queryContent">
				<input class="inputText" type="text" id="queryUserId" />
			</td>
			<td class="queryTitle" width="100px">用户手机号</td>
			<td class="queryContent">
				<input class="inputText" type="text" id="queryMobile" />
			</td>
			<td class="queryBtnTd" colspan="2">
				<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search"  onclick="doQuery3()">查询</a>
			</td>
		</tr>
	</table>
	</form>
	<div border="false" style="margin-top:0px;">
		<s:hidden name="disId" id="disId"></s:hidden>
		<table id="uDocGrid"></table>
	</div>
</div>

<div id="priceDlg" class="easyui-window" title="" closed="true" style="width:600px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="priceForm"  method="POST">
			<s:hidden name="pDId" id="pDId"/>
			<table border="0" class="queryTable" width="95%" height="auto" style="margin-bottom:0px;" id="priceTable">
				<tr>	
					<td class="queryTitle" width="120px">设计费(单位分)</td>
					<td class="queryContent">
						<s:textfield id="updPrice" name="updPrice" cssClass="inputText easyui-validatebox" data-options="" onkeyup="value=value.replace(/[^\d]/gi,'')" cssStyle="width:250px"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="priceBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="doUpdPrice()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelUpdPrice()">取消</a>
    </div>
</div>

<div id="saleListDlg" class="easyui-window" title="" closed="true" style="width:900px; height:500px;text-align:center; background: #fff;">
	<div border="false" style="padding-left:10px;padding-right:10px;">
		<form id="saleForm"  method="POST">
			<%-- <s:hidden name="sDId" id="sDId"/> --%>
			<table border="0" class="queryTable" width="400px" height="auto" style="margin-bottom:0px;" id="saleTable">
				<tr>
				    <td class="queryTitle" width="80px">模版大分类</td>
					<td class="queryContent" width="100px">
						<span id="sTopType" style="color:red;"></span>
					</td>
					<td class="queryTitle" width="80px">设计模版ID</td>
					<td class="queryContent" width="100px">
						<span id="sDId" style="color:red;"></span>
					</td>
				</tr>
			</table>
			<table id="saleGrid"></table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="saleBtn">
		<a class="easyui-linkbutton" iconCls="icon-add" href="javascript:void(0)" onclick="addSale()">添加价目</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="delSale()">删除价目</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="closeSaleList()">关闭</a>
    </div>
</div>
<div id="saleEditDlg" class="easyui-window" title="" closed="true" style="width:600px; height:200px;text-align:center; background: #fff;">
	<div border="false" style="padding-left:10px;padding-right:10px">
		<form id="saleEditForm"  method="POST">
			<table border="0" class="queryTable" width="96%" height="auto" style="margin-bottom:0px;" id="saleEditTable">
				<tr>	
					<td class="queryTitle" width="120px">模版类型</td>
					<td class="queryContent">
						<span id="sEdtType" style="color:red;"></span>
					</td>
					<td class="queryTitle" width="120px">设计模版ID</td>
					<td class="queryContent">
						<span id="sEdtDId" style="color:red;"></span>
					</td>
				</tr>
				<tr>	
					<td class="queryTitle" width="120px">售价(单位分)</td>
					<td class="queryContent" colspan='3'>
						<s:textfield id="sEdtPrice" cssClass="inputText easyui-validatebox" data-options="" onkeyup="value=value.replace(/[^\d]/gi,'')" cssStyle="width:250px"/>
					</td>
				</tr>
				<tr>	
					<td class="queryTitle" width="120px">有效时长(单位天)</td>
					<td class="queryContent" colspan='3'>
						<s:textfield id="sEdtPeriod" cssClass="inputText easyui-validatebox" data-options="" onkeyup="value=value.replace(/[^\d]/gi,'')" cssStyle="width:250px"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="saleEditBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="doSaleEdit()">确定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelSaleEdit()">取消</a>
    </div>
</div>

<div id="vipDlg" class="easyui-window" title="" closed="true" style="width:400px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="vipForm"  method="POST">
			<s:hidden name="vDId" id="vDId"/>
			<table border="0" class="queryTable" width="95%" height="auto" style="margin-bottom:0px;" id="vipTable">
				<tr>	
					<td class="queryTitle" width="120px">模版级别</td>
					<td class="queryContent">
					    <select id="updVip" name="updVip" class="easyui-combobox" panelHeight="auto" editable="false" style="width: 120px" >
					    		<option value="0" selected>普通模版</option>
								<option value="10">VIP专属模版</option>
						</select> 
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="vipBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="doUpdVip()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelUpdVip()">取消</a>
    </div>
</div>

<div id="keywordDlg" class="easyui-window" title="" closed="true" style="width:850px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="keywordForm"  method="POST">
			<s:hidden name="kwDId" id="kwDId"/>
			<s:hidden name="kwType" id="kwType"/>
			<table border="0" class="queryTable" width="96%" height="auto" style="margin-bottom:0px;" id="keywordTable">
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="keywordBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="updKW()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelKW()">取消</a>
    </div>
</div>

<div id="topicDlg" class="easyui-window" title="" closed="true" style="width:850px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="topicForm"  method="POST">
			<s:hidden name="stDId" id="stDId"/>
			<s:hidden name="stType" id="stType"/>
			<table border="0" class="queryTable" width="96%" height="auto" style="margin-bottom:0px;" id="topicTable">
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="topicBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="updTopic()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelTopic()">取消</a>
    </div>
</div>

<div id="srcUploadDlg" class="easyui-window" title="" closed="true" style="width:680px; height:auto;text-align:left; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="srcUploadForm"  method="POST" enctype="multipart/form-data">
			<s:hidden name="upDId" id="upDId"/>
			<h3><span style="color:blue">当前源文件：</span></h3>
			<h4 id="curSrcUrl"></h4>
			</br>
			<hr>
			<h3><span style="color:blue">所选择文件：</span><span style="color:red">(*请尽量使用英文名文件)</span></h3>
			<div id="ossfile"></div>
			<div style="display:none;margin-top:10px" id="uploadMsg">
				<input type="text" name="msgTxt" id="msgTxt" value="处理完毕！" size="100" readonly="true" style="border:0px;left:20px;color:green"/>
		    </div>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="srcUploadBtn">
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="clearSrcUrl()">清除源文件</a>
		<a class="easyui-linkbutton" id="selSrcFile" iconCls="icon-add" href="javascript:void(0)" >选择源文件</a>
		<a class="easyui-linkbutton" id="postFiles" iconCls="icon-ok" href="javascript:void(0)" >上传更新</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelSrcUpload()">关闭窗口</a>
    </div>
</div>

<!-- 一键秀 模板设置套餐价格  -->
<div id="mealDlg" class="easyui-window" title="" closed="true" style="width:850px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="mealForm"  method="POST">
			<s:hidden name="tgDesignId" id="tgDesignId"/>
			<s:hidden name="uItemId" id="uItemId"/>
			<table border="0" class="queryTable" width="96%" height="auto" style="margin-bottom:0px;" id="mealTable">
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="mealBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="updMeal()">设定</a>
		<a class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" onclick="cancelMeal()">取消</a>
    </div>
</div>


<div id="viSizeInfoDlg" class="easyui-window" title="" closed="true" style="width:400px; height:auto;text-align:center; background: #fff;">
	<div border="false" style="padding-left:20px;">
		<form id="viSizeForm"  method="POST">
			<table>
				<tr>
					<td style="color: blue;" class="queryTitle">视频SizeID:</td>
					<td class="queryContent"><span id="viSizeId"></span></td>
				</tr>
				<tr>
					<td style="color: blue;" class="queryTitle">视频位置:</td>
					<td class="queryContent"><textarea rows="4" cols="15" id="viSizePos"></textarea></td>
				</tr>
			</table>
		</form>
	</div>
	<div style="clear:both;padding-top:10px;margin-bottom:10px;text-align:center;" id="viSizeBtn">
		<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="cancelShowViSize()">OK</a>
    </div>
</div>

<div id="yjxSetDlg" class="easyui-window" closed="true" style="width:400px;height:auto;text-align:center; background: #fff;">
	<s:hidden id="yjxDesignId"></s:hidden>
	<s:hidden id="yjxUnitemId"></s:hidden>
	<s:hidden id="yjxFormId"></s:hidden>
	<table>
		<tr>
			<td class="queryTitle" style="color:green;">一键秀 模板价格设置:</td>
			<td class="queryContent"><a href="javascript:void(0)" onclick="showPrice()">设定</a></td>
		</tr>
		<tr>
			<td class="queryTitle" style="color: red;">一键秀 模板表单设置:</td>
			<td class="queryContent"><a href="javascript:void(0)" onclick="showDesignForm()">设定</a></td>
		</tr>
	</table>
</div>

<!-- 设计模板 设置表单  -->
<div id="tgFormDlg" class="easyui-window" title="" closed="true" style="width:1000px; height:auto;text-align:center; background: #fff;">
	<form id="tgFormForm"  method="POST">
		<s:hidden name="uitemId" id="uitemId"/>
		<table class="queryTable">
			<tr>
				<td class="queryTitle">设计模板ID:</td>
				<td class="queryContent"><span id="designIdForm" style="width:80px;"></span></td>
				<td class="queryTitle">模板已设置的表单ID:</td>
				<td class="queryContent"><span id="formId" style="width:80px;color:red;"></span></td>
			</tr>
		</table>
		<table id="tgFormTable">
		</table>
	</form>
</div>

<script type="text/javascript" src="${ctx }/js/qiniu/plupload/plupload.full.min.js"></script>
<script type="text/javascript" src="${ctx }/js/qiniu/plupload/i18n/zh_CN.js"></script>
<script type="text/javascript" src="${ctx}/js/tg/designInfo.js"></script>
<script type="text/javascript" src="${ctx}/js/encrypt/encrypted-min.js"></script>
</body>
</html>
